/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package org.abc;

import java.util.Date;

/**
 * <p>Project: jse2303 - Ex7
 * <p>Powered by webrx On 2023-07-06 17:49:30
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Ex7 {
    public static void main(String[] args) {
        Date d = new Date();
        int h = d.getHours();
        System.out.println(h);
        ;
        if (h >= 6 && h < 8) {
            System.out.println("早上好");
        } else if (h >= 8 && h < 12) {
            System.out.println("上午好");
        } else if (h >= 12 && h < 14) {
            System.out.println("中午好");
        } else if (h >= 14 && h < 18) {
            System.out.println("下午好");
        }


    }
}
